import request from '@/utils/request'

/**
 * 获取用户导出记录
 * @param {Object} params 查询参数
 * @returns {Promise} 返回导出记录列表
 */
export function getUserExportRecords(params) {
  return request({
    url: '/user/export-records',
    method: 'get',
    params
  })
}

/**
 * 删除单个导出记录
 * @param {number|string} id 导出记录ID
 * @returns {Promise} 删除结果
 */
export function deleteExportRecord(id) {
  return request({
    url: `/user/export-records/${id}`,
    method: 'delete'
  })
}

/**
 * 批量删除导出记录
 * @param {Array} ids 导出记录ID数组
 * @returns {Promise} 删除结果
 */
export function batchDeleteExportRecords(ids) {
  return request({
    url: '/user/export-records/batch',
    method: 'delete',
    data: { ids }
  })
}

/**
 * 下载导出文件
 * @param {number|string} id 导出记录ID
 * @returns {Promise} 文件内容
 */
export function downloadExportFile(id) {
  return request({
    url: `/user/export-records/${id}/download`,
    method: 'get',
    responseType: 'blob'
  })
} 